/*
 * MyMap.h
 *
 *  Created on: 16 Oct 2013
 *      Author: Patrick
 */

#ifndef MYMAP_H_
#define MYMAP_H_

#include <OgreNode.h>

#include "../MyInputManager.h"
#include "engine/datatypes/MapObject.h"
#include <engine/datatypes/HermiteSurface.h>

namespace GameMap {

class Map : public OIS::KeyListener {
public:
	Map(MyInputManager* inptMgr);
	virtual ~Map();

	virtual bool keyPressed(const OIS::KeyEvent &arg);
	virtual bool keyReleased(const OIS::KeyEvent &arg);

	void setupDemoScene(Ogre::SceneManager* sceneMgr);

private:
	void setupHeightLines(Ogre::SceneManager* sceneMgr);
	void setupGrid(Ogre::SceneManager* sceneMgr);

	Ogre::Image* heightmap;

	Ogre::SceneNode* heightLinesNode;
	Ogre::SceneNode* gridNode;

	Engine::HermiteSurface* surface;
	std::vector<Engine::MapObject*> heightLines;
};

}

#endif /* MYMAP_H_ */
